home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8002 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Far pointers on BorlandC++
  5. Date: Thu, 29 Feb 96 17:25:39 GMT
  6. Organization: none
  7. Message-ID: <825614739snz@genesis.demon.co.uk>
  8. References: <4h4m5o$fmo@ci.ist.utl.pt>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4h4m5o$fmo@ci.ist.utl.pt>
  15.            l42571@alfa.ist.utl.pt "PEDRO NUNO RODRIGUES DA FONSECA" writes:
  16.  
  17. >
  18. >
  19. >        I would like to know tips for optimizing the use of
  20. >"far" pointers on Borland C++
  21.  
  22. "far" has no relevance to the C language - a good place to discuss it
  23. would be comp.os.msdos.programmer.
  24.  
  25. >and avoiding pROBlems such as
  26. >corrupting system files.
  27.  
  28. Don't write code that writes to system files! :-)
  29.  
  30. You probably mean how to avoid scrapping parts of the OS in an unprotected
  31. environment which basically boils down to writing 'correct' programs. Most
  32. destructive behaviour results from the misuse of pointers e.g. using the
  33. values of uninitialised pointers, exceeding array bounds, bad casting,
  34. passing bad pointers to free (or realloc for that matter), dereferencing
  35. or performing pointer arithmetic on null pointers.
  36.  
  37. >I would also like to know if there
  38. >is any remote way in wich I can allocate more than 1Mbyte of
  39. >memory.Everyone I know told me it is impossible but I found
  40. >it hard to believe that any decent compiler had such a severe
  41. >restraint.    
  42.  
  43. This is entirely a DOS issue so ask it in comp.os.msdos.programmer. The
  44. limitation is an archetectural one stemming from the original IBM PC. You
  45. can get around it but not using anything that is relevant to the C language
  46. itself.
  47.  
  48. -- 
  49. -----------------------------------------
  50. Lawrence Kirby | fred@genesis.demon.co.uk
  51. Wilts, England | 70734.126@compuserve.com
  52. -----------------------------------------
  53.